package org.example.service;

import org.example.dao.UserDao;
import org.example.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("UserService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;
    @Override
    @Transactional
    public void transfer(String out, String in, int money) {
        userDao.TransforMoney(out,money);
        int a=1/0;
        userDao.getMoney(in,money);
    }
}
